package com.lebang.mapper;

import com.lebang.configuration.datasource.DataSource;
import com.lebang.entity.task.TaskScreenshot;
import com.lebang.example.TaskScreenshotExample;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.time.LocalDateTime;
import org.apache.ibatis.annotations.Param;

/**
 * TaskScreenshotMapper继承基类
 */
@Mapper
public interface TaskScreenshotMapper extends MyBatisBaseDao<TaskScreenshot, Long, TaskScreenshotExample> {

    @DataSource("commonDB")
    List<TaskScreenshot> selectByCondition(@Param("status") String status, @Param("calssifyId") Integer calssifyId, @Param("tagId") Integer tagId, @Param("starTime") LocalDateTime starTime, @Param("endTime") LocalDateTime endTime);

    @DataSource("commonDB")
    TaskScreenshot selectByTaskId(@Param("taskId") String taskId);

    @DataSource("commonDB")
    int updateById(@Param("taskScreenshot") TaskScreenshot taskScreenshot);

    @DataSource("commonDB")
    List<TaskScreenshot> selectByTitle(@Param("title") String title,@Param("startNum") Integer startNum,@Param("pageSize") Integer pageSize);

    @DataSource("commonDB")
    Integer countByTitle(@Param("title") String title);
}